import request from "../utils/request.js"

/*
 * 获取 铸造 点检设备
 */
export const getFoundyDeviceList = () => {
  return request({
    method: 'GET',
    url: '/api/check/getFoundyDeviceList',
    data: {}
  })
}/*
 * 获取 机加工 点检设备
 */
export const getMachineDeviceList = () => {
  return request({
    method: 'GET',
    url: '/api/check/getMachineDeviceList',
    data: {}
  })
}
/*
 * 获取 涂装 点检设备
 */
export const getPlantCheckDeviceList = () => {
  return request({
    method: 'GET',
    url: '/api/check/getPlantCheckDeviceList',
    data: {}
  })
}

/*
 * 获取 点检设备 名字
 */
export const getDeviceName = deviceId => {
  return request({
    method: 'POST',
    url: '/api/check/getDeviceName',
    data: {
      deviceId:deviceId
    }
  })
}
/*
 * 获取 点检设备点检项 名字
 */
export const getCheckItemName = Ids => {
  return request({
    method: 'POST',
    url: '/api/check/getCheckItemName',
    data: Ids
  })
}
/*
 * 获取设备点检装置列表
 */
export const getDeviceCheckItemList = deviceId => {
  return request({
    method: 'POST',
    url: '/api/check/getDeviceCheckItemList',
    data: {
      device:deviceId
    }
  })
}

/*
 * 获取设备点检装置点检内容列表
 */
export const getDeviceCheckContent = checkInfo => {
  return request({
    method: 'POST',
    url: '/api/check/getDeviceCheckContent',
    data: {info:checkInfo}
  })
}

/*
 * 提交图片
 */
export const uploadImage = (formData) => {
  return request({
    method: 'POST',
    url: '/api/check/uploadImage',
    data: formData
  })
}
/**
 * 
 * 提交点检内容
 */
export const submitCheckInfo = (checkInfo) => {
  return request({
    method: 'POST',
    url: '/api/check/submitCheckInfo',
    data: checkInfo
  })
}
